package com.dalonedrau.jogl.opengl;

import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;

public interface View {
	/**
	 * Handles a key event.
	 * @param e the {@link KeyEvent}
	 */
	void handleKeyEvent(KeyEvent e);
	/**
	 * Checks the mouse position and changes the cursor when over a gui
	 * component.
	 * @param x the x position
	 * @param y the y position
	 */
	void handleMouseOver(float x, float y);
	/**
	 * Handles a mouse press event.
	 * @param e the {@link MouseEvent}
	 * @param x the x position
	 * @param y the y position
	 */
	void handleMousePress(MouseEvent e, float x, float y);
	/**
	 * Prepares the {@link View} for the rendering loop.
	 * @throws Exception if an error occurs
	 */
	void prepareForRendering() throws Exception;
}
